package cn.edu.neu.vmmigeval.cloud.entity;

/**
 * Created by yfwz100 on 16/2/25.
 */
public class Cloudlet {

    /**
     * 类型id
     */
    private int id;
    /**
     * 需要的总长度  mips
     */
    private long cloudletLength;

    /**
     * cloudlet finished
     */
    private long cloudletFinished;

    /**
     * The num of Pe required to execute this job.
     */
    private int numberOfPes;

    /**
     * The status of this Cloudlet.
     */
    private int status;

    /**
     * The vm id.
     */
    protected int vmId;

    /**
     * start time
     */
    private int startTime;

    /**
     * finish time
     */
    private int finishTime;

    /**
     * The utilization of cpu
     */
    private UtilizationModel cpuUtilizationModel;

    /**
     * The utilization of memory
     */
    private UtilizationModel ramUtilizationModel;

    /**
     * The utilization of bw
     */
    private UtilizationModel bwUtilizationModel;

    /**
     * The utilization of disk
     */
    private UtilizationModel diskUtilizationModel;

    private int cpu;// = cpuUtilizationgetUtilization() ;

    private int ram;// = ramUtilizationgetUtilization();

    private int bw;// = bwUtilizationgetUtilization();

    private int disk;// = diskUtilizationgetUtilization();


    public Cloudlet(int id, long cloudletLength, int startTime, UtilizationModel cpuUtilizationModel,
                    UtilizationModel ramUtilizationModel,
                    UtilizationModel bwUtilizationModel,
                    UtilizationModel diskUtilizationModel) {
        super();
        this.id = id;
        this.cloudletLength = cloudletLength;
        this.startTime = startTime;
        this.cpuUtilizationModel = cpuUtilizationModel;
        this.ramUtilizationModel = ramUtilizationModel;
        this.bwUtilizationModel = bwUtilizationModel;
        this.diskUtilizationModel = diskUtilizationModel;
    }

    public Cloudlet(int id, long cloudletLength, int numberOfPes, int status,
                    int vmId, int startTime, int finishTime,
                    UtilizationModel cpuUtilizationModel,
                    UtilizationModel ramUtilizationModel,
                    UtilizationModel bwUtilizationModel,
                    UtilizationModel diskUtilizationModel) {
        super();
        this.id = id;
        this.cloudletLength = cloudletLength;
        this.numberOfPes = numberOfPes;
        this.status = status;
        this.vmId = vmId;
        this.startTime = startTime;
        this.finishTime = finishTime;
        this.cpuUtilizationModel = cpuUtilizationModel;
        this.ramUtilizationModel = ramUtilizationModel;
        this.bwUtilizationModel = bwUtilizationModel;
        this.diskUtilizationModel = diskUtilizationModel;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public long getCloudletLength() {
        return cloudletLength;
    }

    public void setCloudletLength(long cloudletLength) {
        this.cloudletLength = cloudletLength;
    }

    public int getNumberOfPes() {
        return numberOfPes;
    }

    public void setNumberOfPes(int numberOfPes) {
        this.numberOfPes = numberOfPes;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getVmId() {
        return vmId;
    }

    public void setVmId(int vmId) {
        this.vmId = vmId;
    }

    public int getStartTime() {
        return startTime;
    }

    public void setStartTime(int startTime) {
        this.startTime = startTime;
    }

    public int getFinishTime() {
        return finishTime;
    }

    public void setFinishTime(int finishTime) {
        this.finishTime = finishTime;
    }

    public UtilizationModel getCpuUtilizationModel() {
        return cpuUtilizationModel;
    }

    public void setCpuUtilizationModel(UtilizationModel cpuUtilizationModel) {
        this.cpuUtilizationModel = cpuUtilizationModel;
    }

    public UtilizationModel getRamUtilizationModel() {
        return ramUtilizationModel;
    }

    public void setRamUtilizationModel(UtilizationModel ramUtilizationModel) {
        this.ramUtilizationModel = ramUtilizationModel;
    }

    public UtilizationModel getBwUtilizationModel() {
        return bwUtilizationModel;
    }

    public void setBwUtilizationModel(UtilizationModel bwUtilizationModel) {
        this.bwUtilizationModel = bwUtilizationModel;
    }

    public UtilizationModel getDiskUtilizationModel() {
        return diskUtilizationModel;
    }

    public void setDiskUtilizationModel(UtilizationModel diskUtilizationModel) {
        this.diskUtilizationModel = diskUtilizationModel;
    }

    public long getCloudletFinished() {
        return cloudletFinished;
    }

    public void setCloudletFinished(long cloudletFinished) {
        this.cloudletFinished = cloudletFinished;
    }

    public int getCpu() {
        return cpu;
    }

    public void setCpu(int cpu) {
        this.cpu = cpu;
    }

    public int getRam() {
        return ram;
    }

    public void setRam(int ram) {
        this.ram = ram;
    }

    public int getBw() {
        return bw;
    }

    public void setBw(int bw) {
        this.bw = bw;
    }

    public int getDisk() {
        return disk;
    }

    public void setDisk(int disk) {
        this.disk = disk;
    }


}
